home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gui / muibuilderv11.lha / muibuilder / mb / e / small_locale / Small_cat.e < prev    next >
Text File  |  1994-03-15  |  2KB  |  74 lines

  1. /****************************************************************
  2.    This file was created automatically by `FlexCat V1.1'
  3.    Do not edit by hand!
  4. ****************************************************************/
  5.  
  6.  
  7.     /* External modules */
  8. MODULE 'locale', 'libraries/locale'
  9. MODULE 'utility/tagitem'
  10.  
  11.     /* Object definitions */
  12. OBJECT fc_type
  13.     id  :LONG
  14.     str :LONG
  15. ENDOBJECT
  16.  
  17.     /* Global variables */
  18. DEF catalog_Small:PTR TO catalog
  19. DEF array_Small[5]:ARRAY OF fc_type
  20.  
  21.     /* Constant definitions */
  22. CONST MSG_AppDescription = 0
  23. CONST MSG_WI_smallexample = 1
  24. CONST MSG_GR_lists = 2
  25. CONST MSG_BT_ok = 3
  26. CONST MSG_BT_cancel = 4
  27.  
  28.  
  29.     /* Opening catalog procedure */
  30. PROC open_Small_catalog(loc:PTR TO locale, language:PTR TO CHAR)
  31.     DEF tag, tagarg, dummy_var = 0
  32.  
  33.     array_Small[dummy_var].id := MSG_AppDescription; array_Small[dummy_var++].str := 'Here is a small example of MUI-Builder'
  34.     array_Small[dummy_var].id := MSG_WI_smallexample; array_Small[dummy_var++].str := 'Small example'
  35.     array_Small[dummy_var].id := MSG_GR_lists; array_Small[dummy_var++].str := 'two lists'
  36.     array_Small[dummy_var].id := MSG_BT_ok; array_Small[dummy_var++].str := '_o OK'
  37.     array_Small[dummy_var].id := MSG_BT_cancel; array_Small[dummy_var++].str := '_c Cancel'
  38.  
  39.     IF (localebase AND (catalog_Small = NIL))
  40.         IF language
  41.             tag := OC_LANGUAGE
  42.             tagarg := language
  43.         ELSE
  44.             tag:= TAG_IGNORE
  45.         ENDIF
  46.  
  47.         catalog_Small := OpenCatalogA(loc, 'Small.catalog',
  48.                                     [   OC_BUILTINLANGUAGE, 'english',
  49.                                         tag, tagarg,
  50.                                         OC_VERSION, 0,
  51.                                         TAG_DONE    ])
  52.     ENDIF
  53. ENDPROC
  54.     
  55.     /* Closing catalog procedure */
  56. PROC close_Small_catalog()
  57.  
  58.     IF localebase THEN CloseCatalog(catalog_Small)
  59.     catalog_Small := NIL
  60. ENDPROC
  61.  
  62.     /* Procedure which returns the correct string according to the catalog */
  63. PROC get_Small_string(strnum)
  64.     DEF defaultstr:PTR TO CHAR, i = 0
  65.  
  66.     WHILE ((i < 5) AND (array_Small[i].id <> strnum)) DO INC i
  67.     defaultstr := IF (i < 5) THEN array_Small[i].str ELSE NIL
  68.  
  69. ENDPROC IF catalog_Small THEN GetCatalogStr(catalog_Small, strnum, defaultstr) ELSE defaultstr
  70. /****************************************************************
  71.    End of the automatically created part!
  72. ****************************************************************/
  73.  
  74.